<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // NaN not a Number
    console.log(Number('wangyang')); // 字符串转换为数字类型，NaN
    console.log(2 / 'wangyang'); // 数字与字符串运算NaN
    let wangyang = "89sss22s"
    console.log(Number(wangyang)); // NaN
    let array = [1, 2, 3]
    console.log(Number(array)); //NaN
    console.log(Number({})); //NaN
    
    // 可以使用isNaN来判断是否为NaN
    console.log(Number.isNaN(2 / 'wangyang'));
    console.log(Object.is(2 / 'wangyang', NaN));
  </script>
</body>

</html>